package com.eapi.project.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.eapi.eapicommom.model.entity.User;
import com.eapi.project.common.BaseResponse;
import com.eapi.project.model.dto.article.AddArticleDto;
import com.eapi.project.model.dto.article.ArticleDeleteRequest;
import com.eapi.project.model.dto.article.ArticleTopRequest;
import com.eapi.project.model.dto.article.ArticleUpdateRequest;
import com.eapi.project.model.entity.Article;
import com.eapi.project.model.vo.ArticleDetailVo;
import com.eapi.project.model.vo.HotArticleVo;
import com.eapi.project.model.vo.PageVo;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

public interface ArticleService extends IService<Article> {
    BaseResponse<List<HotArticleVo>> hotArticleList();

    BaseResponse<PageVo> articleList(Integer pageNum, Integer pageSize, Long categoryId);

    BaseResponse<ArticleDetailVo> getArticleDetail(Long id);

    void addArticle(AddArticleDto addArticleDto,Long userId);

    BaseResponse<Boolean> deleteArticle(ArticleDeleteRequest deleteRequest, User user, HttpServletRequest request);

    BaseResponse<Boolean> updateArticle(ArticleUpdateRequest articleUpdateRequest, User user);

    BaseResponse<PageVo> listAllArticle(Integer pageNum, Integer pageSize, User user);

    BaseResponse<String> topArticle(ArticleTopRequest articleTopRequest, User user);

    BaseResponse<String> cancelTopArticle(ArticleTopRequest articleTopRequest, User user);

    BaseResponse<PageVo> getDraft(User user, Integer pageNum, Integer pageSize);

    BaseResponse<PageVo> getPublic(User user, Integer pageNum, Integer pageSize);

}